﻿using SelfMadeMillioniare.API.TransportObjects;

namespace SelfMadeMillioniare.API.Helpers
{
    public class FormatHelper
    {
        public static string Required(string fieldName)
        {
            return string.Format("Field '{0}' is required", fieldName);
        }

        public static string IsNullOrEmpty(string fieldName)
        {
            return string.Format("Field '{0}' is null or empty", fieldName);
        }

        public static string NotFound(string fieldName)
        {
            return string.Format("Entity '{0}' not found in db", fieldName);
        }

        public static string UserNotFoundBy(params string[] fields)
        {
            return string.Format("User not found by: {0}", string.Join(",", fields));
        }

        public static string UserNotFoundByEmail()
        {
            return string.Format("Email not found in out database");
        }

        public static string UserNotFound()
        {
            return string.Format("User not found in out database");
        }

        public static string AlreadyExist(string fieldName)
        {
            return string.Format("Entity with '{0}' already exist in db", fieldName);
        }

        public static string IncorrectFormat(string fieldName)
        {
            return string.Format("Field '{0}' is incorrect format", fieldName);
        }

        public static string HasNoAcces(string operationName)
        {
            return string.Format("Has no access for operation {0}", operationName);
        }
    }
}